<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <link rel="stylesheet" href="../lib/css/bootstrap.min.css">
  <link rel="stylesheet" href="../css/index.css">
  <script src="../lib/js/jquery.min.js"></script>
  <script src="../lib/js/bootstrap.min.js"></script>
  <title>Document</title>
</head>

<body>
  <div class="page">
      <nav class="navbar navbar-default navbar-fixed-top">
          <div class="container">
            <!-- Brand and toggle get grouped for better mobile display -->
            <div class="navbar-header">
              <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
              </button>
              <a class="navbar-brand" href="index.html">Logo</a>
            </div>
            <!-- Collect the nav links, forms, and other content for toggling -->
            <div class="collapse navbar-collapse" id="navbar">
              <ul class="nav nav-pills navbar-right">
                  <li><a href="admin.html">系统</a></li>
                  <li><a href="#">退出</a></li>
              </ul>
            </div><!-- /.navbar-collapse -->
          </div><!-- /.container-fluid -->
        </nav>
    <div class="container">
      <div class="m-title">出库
        <span>/Outbound</span>
      </div>
      <form class="form-horizontal">
        <div class="form-group warehousing-type">
          <label class="col-sm-2 control-label">产品</label>
          <div class="col-sm-10 type-list">
            <span class="btn btn-default">青菜</span>
            <span class="btn btn-default">猪肉</span>
            <span class="btn btn-default">萝卜</span>
            <span class="btn btn-default">青菜</span>
            <span class="btn btn-default">猪肉</span>
            <span class="btn btn-default">萝卜</span>
            <span class="btn btn-default">青菜</span>
            <span class="btn btn-default">猪肉</span>
            <span class="btn btn-default">萝卜</span>
            <span class="btn btn-default">青菜</span>
            <span class="btn btn-default">猪肉</span>
            <span class="btn btn-default">萝卜</span>
            <span class="btn btn-default">青菜</span>
            <span class="btn btn-default">猪肉</span>
            <span class="btn btn-default">萝卜</span>
            <span class="btn btn-default">青菜</span>
            <span class="btn btn-default">猪肉</span>
            <span class="btn btn-default">萝卜</span>
            <span class="btn btn-default">青菜</span>
            <span class="btn btn-default">猪肉</span>
            <span class="btn btn-default">萝卜</span>
            <span class="btn btn-default">青菜</span>
            <span class="btn btn-default">猪肉</span>
            <span class="btn btn-default">萝卜</span>
            <span class="btn btn-default">青菜</span>
            <span class="btn btn-default">猪肉</span>
            <span class="btn btn-default">萝卜</span>
            <span class="btn btn-default">青菜</span>
            <span class="btn btn-default">猪肉</span>
            <span class="btn btn-default">萝卜</span>
            <span class="btn btn-default">青菜</span>
            <span class="btn btn-default">猪肉</span>
            <span class="btn btn-default">萝卜</span>
            <span class="btn btn-default">青菜</span>
            <span class="btn btn-default">猪肉</span>
            <span class="btn btn-default">萝卜</span>
            <span class="btn btn-default">青菜</span>
            <span class="btn btn-default">猪肉</span>
            <span class="btn btn-default">萝卜</span>
          </div>
          <div class="show-more col-sm-offset-2 col-sm-10"><span class="btn btn-primary">查看更多</span></div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">数量</label>
          <div class="col-sm-10">
            <input type="text" class="form-control" placeholder="数量">
          </div>
        </div>
        <div class="form-group">
          <div class="col-sm-offset-2 col-sm-10">
            <button class="btn btn-primary">确定</button>
            <button class="btn btn-default">取消</button>
          </div>
        </div>
      </form>
    </div>
  </div>
  <script>
    $(".warehousing-type").each(function () {
      var list = $(this).find(".type-list");
      var btn = $(this).find(".show-more .btn");
      if (list.height() > 74){
        list.addClass("overflow").show();
        btn.parent().show();
      }
      btn.on("click", function () {
        if (list.hasClass("overflow")) {
          list.removeClass("overflow");
          $(this).text("收起更多");
        }else{
          list.addClass("overflow");
          $(this).text("展开更多")
        }
      })
    })
  </script>
</body>
</html>